package com.management.mapper;

import com.management.po.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StudentMapper {
    @Insert("insert into student values(#{studentId},#{studentName},#{major},#{grade},#{classes})")
    public int saveStudent(Student student);

    @Select("select * from student where studentId=#{studentId}")
    public Student getStudentById(String studentId);

    @Delete("delete from student where studentId=#{studentId}")
    public int deleteStudentById(String studentId);
}
